
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import jxl.*;
import jxl.write.*;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author ahmet
 */
public class ExcelWriteTest {
    public static void main(String[] args){
        try {
            WritableWorkbook workbook = Workbook.createWorkbook(new File("test.xls"));
            WritableSheet sheet = workbook.createSheet("Test Sheet", 0);
            String[] text="Posture Correction System Excel Test".split(" ");
            for(int i=0; i<text.length; i++)
                sheet.addCell(new Label(i+1, i+1, text[i]));
            workbook.write();
            workbook.close();
        } catch (WriteException ex) {
            Logger.getLogger(ExcelWriteTest.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
}
